import { Component } from "react";

class Footer extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        const { todos } = this.props;
        const dones = todos.filter((todo) => todo.completed);
        return (
            <footer>
                <div className='alert alert-danger'>
                    已完成<strong>{dones.length}</strong> / 共有
                    <strong>{todos.length}</strong>
                </div>
            </footer>
        );
    }
}

export default Footer;
